After completing this lesson, you'll be able to:
In this lesson, you will:
After completing this lesson, you'll be able to:
In this lesson, you will:
FME Flow displays user parameters in a sleek, easy-to-use form that you populate before running the workspace. FME Flow shows each parameter with the appropriate control based on its type. Here are examples of how a few common parameter types appear on FME Flow:






Jennifer is creating a user-controlled self-serve workflow. Jennifer's workspace reads community features from the CommunityMap file geodatabase and writes them out using a Generic writer, which supports writing to any FME-supported format. She wants the user to be able to select which feature layers to download and the output data format.
For this exercise, follow the steps below to configure the parameters for Jennifer's self-serve workspace and run it on FME Flow.
Open the starting workspace (C:\FMEData\Workspaces\DeployWorkflowsWithFMEFlow\create-a-user-controlled-workspace.fmw) in FME Workbench. The workspace reads in community features from the CommunityMap file geodatabase and then writes them out using a Generic writer.

Jennifer has already created a user parameter to specify the data output format, and it's linked to the writer's parameters. However, Jennifer would also like the end-user to select which feature types to include in the output.

In addition to the OUTPUT_FORMAT parameter, Jennifer needs to create a parameter for the user to select which Feature Types to include in the output.
In the Navigator pane, expand the CommunityMap [FILEGDB] reader and further expand the Parameters and Features to Read sections. Right-click the Feature Types to Read parameter and select Create User Parameter.

A window displays a list of Feature Types, along with the user parameter name, prompt, and default value.

You don't need to alter anything from the default here, so click OK to finalize creating the parameter. This parameter allows the user to control which datasets to include in the output. You should now see both user parameters in Navigator.

You could also create this user parameter in the Manage User Parameters window. However, this method automatically generates the list of available feature types to select from and link the FEATURE_TYPES parameter to the Feature Types to Read writer parameter, so this method is quicker for this scenario.
Now, Jennifer would also like to set Esri Shapefile as the default output format. In the Navigator, right-click User Parameters and select Manage User Parameters.
For the Output Format parameter, set the Default Value to Esri Shapefile. Under Choice Configuration, the available format options are Esri Shapefile, MapInfo TAB, and OGC GML.

The Feature Types to Read parameter acts on the reader, and the Output Format parameter links to the writer in the workspace. The parameters displayed in this order will also appear in the same order on FME Flow. Reorder the parameters so the Feature Types to Read parameter appears first. Select the Feature Types to Read parameter and click the Move Up button.

Click OK to close the User Parameters window.
Run the workspace, ensuring Prompt for Parameters is enabled to test that the user parameters function as expected.

A prompt opens where you select the community map feature types to include and the output format from the drop-down.

After you make a selection, click Run. The workspace will read only the selected feature type(s) from the File Geodatabase and include them in the output.
Once you confirm the workspace functions as expected on FME Form, you're ready to publish to FME Flow, so Jennifer's colleagues can access it.
Publish the workspace to the Training repository and register the workspace with the Data Download and Job Submitter services.





Navigate to FME Flow and open the Run Workspace page. Select the workspace you just published and the Data Download service.

Under User Parameters, you'll see the user parameters you configured in FME Workbench. Select a few Feature Types and an Output Format from the drop-down options.


Click Run to run the workspace on FME Flow.
After the workspace runs, FME Flow displays the finished job status and the Data Download URL. Click the URL to download the data.

Extract the zip file and open the Output folder to see the data for the feature types you selected.

You've successfully adapted the workspace to allow users to control the community feature types and output format. Using user parameters provides greater flexibility for users to access and receive the exact data they need from the workspace on FME Flow.
FME Flow displays user parameters in a sleek, easy-to-use form that you populate before running the workspace. FME Flow shows each parameter with the appropriate control based on its type. Here are examples of how a few common parameter types appear on FME Flow:






Jennifer is creating a user-controlled self-serve workflow. Jennifer's workspace reads community features from the CommunityMap file geodatabase and writes them out using a Generic writer, which supports writing to any FME-supported format. She wants the user to be able to select which feature layers to download and the output data format.
For this exercise, follow the steps below to configure the parameters for Jennifer's self-serve workspace and run it on FME Flow.
Open the starting workspace (C:\FMEData\Workspaces\DeployWorkflowsWithFMEFlow\create-a-user-controlled-workspace.fmw) in FME Workbench. The workspace reads in community features from the CommunityMap file geodatabase and then writes them out using a Generic writer.

Jennifer has already created a user parameter to specify the data output format, and it's linked to the writer's parameters. However, Jennifer would also like the end-user to select which feature types to include in the output.

In addition to the OUTPUT_FORMAT parameter, Jennifer needs to create a parameter for the user to select which Feature Types to include in the output.
In the Navigator pane, expand the CommunityMap [FILEGDB] reader and further expand the Parameters and Features to Read sections. Right-click the Feature Types to Read parameter and select Create User Parameter.

A window displays a list of Feature Types, along with the user parameter name, prompt, and default value.

You don't need to alter anything from the default here, so click OK to finalize creating the parameter. This parameter allows the user to control which datasets to include in the output. You should now see both user parameters in Navigator.

You could also create this user parameter in the Manage User Parameters window. However, this method automatically generates the list of available feature types to select from and link the FEATURE_TYPES parameter to the Feature Types to Read writer parameter, so this method is quicker for this scenario.
Now, Jennifer would also like to set Esri Shapefile as the default output format. In the Navigator, right-click User Parameters and select Manage User Parameters.
For the Output Format parameter, set the Default Value to Esri Shapefile. Under Choice Configuration, the available format options are Esri Shapefile, MapInfo TAB, and OGC GML.

The Feature Types to Read parameter acts on the reader, and the Output Format parameter links to the writer in the workspace. The parameters displayed in this order will also appear in the same order on FME Flow. Reorder the parameters so the Feature Types to Read parameter appears first. Select the Feature Types to Read parameter and click the Move Up button.

Click OK to close the User Parameters window.
Run the workspace, ensuring Prompt for Parameters is enabled to test that the user parameters function as expected.

A prompt opens where you select the community map feature types to include and the output format from the drop-down.

After you make a selection, click Run. The workspace will read only the selected feature type(s) from the File Geodatabase and include them in the output.
Once you confirm the workspace functions as expected on FME Form, you're ready to publish to FME Flow, so Jennifer's colleagues can access it.
Publish the workspace to the Training repository and register the workspace with the Data Download and Job Submitter services.





Navigate to FME Flow and open the Run Workspace page. Select the workspace you just published and the Data Download service.

Under User Parameters, you'll see the user parameters you configured in FME Workbench. Select a few Feature Types and an Output Format from the drop-down options.


Click Run to run the workspace on FME Flow.
After the workspace runs, FME Flow displays the finished job status and the Data Download URL. Click the URL to download the data.

Extract the zip file and open the Output folder to see the data for the feature types you selected.

You've successfully adapted the workspace to allow users to control the community feature types and output format. Using user parameters provides greater flexibility for users to access and receive the exact data they need from the workspace on FME Flow.